<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight_cubescript.cfg</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (CubeScript) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;">// </span><span style="color:#3f8058;">kate:</span><span style="color:#7a7c7d;"> </span><span style="color:#7f8c8d;">syntax</span><span style="color:#f44f4f;"> CubeScript</span><span style="color:#7f8c8d;">;</span>
<span style="color:#7a7c7d;">// CubeScript test</span>

i = <span style="color:#f67400;">0</span>
rainbowchat = <span style="font-weight:bold;">[</span>
    out = <span style="color:#f44f4f;">&quot;&quot;</span>
    <span style="color:#8e44ad;">loop</span> k <span style="color:#2980b9;">$</span><span style="color:#27ae60;">numargs</span> <span style="font-weight:bold;">[</span>
        word = <span style="color:#2980b9;">$</span><span style="color:#2980b9;background-color:#153042;">(</span><span style="color:#8e44ad;">format</span> <span style="color:#f44f4f;">&quot;arg%1&quot;</span> <span style="font-weight:bold;">(</span>+ <span style="color:#2980b9;">$k</span> <span style="color:#f67400;">1</span><span style="font-weight:bold;">)</span><span style="color:#2980b9;background-color:#153042;">)</span>
        <span style="color:#8e44ad;">loop</span> j <span style="font-weight:bold;">(</span>stringlen <span style="color:#2980b9;">$word</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>
            out = <span style="font-weight:bold;">(</span><span style="color:#8e44ad;">format</span> <span style="color:#f44f4f;">&quot;%1</span><span style="color:#3daee9;">^fz</span><span style="color:#f44f4f;">%2%3&quot;</span> <span style="color:#2980b9;">$out</span> <span style="font-weight:bold;">(</span>substring <span style="color:#f44f4f;">&quot;rygcbvmr&quot;</span> <span style="color:#2980b9;">$i</span> <span style="color:#f67400;">2</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">(</span>substring <span style="color:#2980b9;">$word</span> <span style="color:#2980b9;">$j</span> <span style="color:#f67400;">1</span><span style="font-weight:bold;">))</span> 
            <span style="color:#8e44ad;">if</span> <span style="font-weight:bold;">(</span>&gt; <span style="color:#2980b9;">$i</span> <span style="color:#f67400;">5</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>i = <span style="color:#f67400;">0</span> <span style="font-weight:bold;">]</span> <span style="font-weight:bold;">[</span>i = <span style="font-weight:bold;">(</span>+ <span style="color:#2980b9;">$i</span> <span style="color:#f67400;">1</span><span style="font-weight:bold;">)]</span>
        <span style="font-weight:bold;">]</span>
        out = <span style="font-weight:bold;">(</span><span style="color:#8e44ad;">format</span> <span style="color:#f44f4f;">&quot;%1 &quot;</span> <span style="color:#2980b9;">$out</span><span style="font-weight:bold;">)</span>
    <span style="font-weight:bold;">]</span>
    <span style="color:#8e44ad;">if</span> <span style="font-weight:bold;">(</span>&lt; <span style="font-weight:bold;">(</span>stringlen <span style="color:#2980b9;">$out</span><span style="font-weight:bold;">)</span> <span style="color:#f67400;">128</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>
        say <span style="color:#2980b9;">$out</span>
    <span style="font-weight:bold;">]</span> <span style="font-weight:bold;">[</span>
        <span style="color:#8e44ad;">echo</span> <span style="font-weight:bold;">(</span><span style="color:#8e44ad;">format</span> <span style="color:#f44f4f;">&quot;This message is %1 chars long - the usual limit is 127. Each letter takes up 5.&quot;</span> <span style="font-weight:bold;">(</span>stringlen <span style="color:#2980b9;">$out</span><span style="font-weight:bold;">))</span>
    <span style="font-weight:bold;">]</span>
<span style="font-weight:bold;">]</span>

setcomplete rainbowchat <span style="color:#f67400;">1</span>
<span style="color:#8e44ad;">listcomplete</span> rainbowchat <span style="font-weight:bold;">[</span>
    <span style="color:#f44f4f;">&quot;BoOoM&quot;</span>
    <span style="color:#f44f4f;">&quot;Good game!&quot;</span>
    <span style="color:#f44f4f;">&quot;What the f*** was this?!?&quot;</span>
    <span style="color:#f44f4f;">&quot;go for it!&quot;</span>
    <span style="color:#f44f4f;">&quot;yeeeehaw!&quot;</span>
    <span style="color:#f44f4f;">&quot;what a mess &gt;_&lt; &quot;</span>
<span style="font-weight:bold;">]</span>

<span style="color:#7a7c7d;">// Line continuation escape</span>
<span style="color:#f44f4f;">&quot;string </span><span style="color:#3daee9;">^</span>
<span style="color:#f44f4f;">    newline&quot;</span>
</pre></body></html>
